﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Web.Configuration;

namespace Universum.Infrastructure.Utils
{
	public class PathConfigurationService : IPathConfigurationService
	{

		public PathConfigurationService(	
			)
		{
			

			var settings = WebConfigurationManager.AppSettings;
			UserPicturePath = settings[MemberUtil<PathConfigurationService>.MemberName(it => it.UserPicturePath)];
			DatabaseFilePath = settings[MemberUtil<PathConfigurationService>.MemberName(it => it.DatabaseFilePath)];
			BlogIndexingFolderPath = settings[MemberUtil<PathConfigurationService>.MemberName(it => it.BlogIndexingFolderPath)];
			QuestionIndexingFolderPath = settings[MemberUtil<PathConfigurationService>.MemberName(it => it.QuestionIndexingFolderPath)];
			TeacherArticleIndexingFolderpath = settings[MemberUtil<PathConfigurationService>.MemberName(it => it.TeacherArticleIndexingFolderpath)];
			ResourcesPath = settings[MemberUtil<PathConfigurationService>.MemberName(it => it.ResourcesPath)];


		}
		#region IPathConfigurationService Members

		public string UserPicturePath
		{
			get;
			set;
		}

		public string DatabaseFilePath
		{
			get;
			private set;
		}

		public string BlogIndexingFolderPath
		{
			get;
			private set;
		}

		public string QuestionIndexingFolderPath
		{
			get;
			private set;
		}

		public string TeacherArticleIndexingFolderpath
		{
			get;
			private set;
		}

		public string ResourcesPath
		{
			get;
			private set;
		}

		#endregion
	}
}
